import service from '.'

const orderApi = {
    getAll(page, userId, empId, typeId, departmentId) {
        return service.get('/admin/appointment', { params: { page, userId, empId, typeId, departmentId } });
    },
    addInfo(appointment) {
        return service.post('/admin/appointment', appointment);
    },
    updateInfo(appointment) {
        return service.put('/admin/appointment', appointment);
    },
    delInfo(id) {
        return service.delete(`/admin/appointment/${id}`);
    },
    getColumnById(id) {
        return service.get(`/admin/appointment/${id}`);
    },
    finishOrder(id) {
        return service.put('/admin/appointment/finsh', { id }, {
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        });
    }
}

export default orderApi;